home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-02-06 | 17.0 KB | 501 lines | [ttro/ttxt] |
- This document has been altered to only include the tag definitions by
- Nombas. It was derived from the html 2.0 spec
-
- Network Working Group T. Berners-Lee
- Request for Comments: 1866 MIT/W3C
- Category: Standards Track D. Connolly
- November 1995
- Hypertext Markup Language - 2.0
-
- HTML has been in use by the World Wide Web (WWW) global information
- initiative since 1990. This specification roughly corresponds to the
- capabilities of HTML in common use prior to June 1994. HTML is an
- application of ISO Standard 8879:1986 Information Processing Text and
- Office Systems; Standard Generalized Markup Language (SGML).
-
-
- 1. Introduction
-
- The HyperText Markup Language (HTML) is a simple data format used to
- create hypertext documents that are portable from one platform to
- another. HTML documents are SGML documents with generic semantics
- that are appropriate for representing information from a wide range
- of domains.
-
- 3.2.2. Tags
-
- Tags delimit elements such as headings, paragraphs, lists, character
- highlighting, and links. Most HTML elements are identified in a
- document as a start-tag, which gives the element name and attributes,
- followed by the content, followed by the end tag. Start-tags are
- delimited by `<' and `>'; end tags are delimited by `</' and `>'. An
- example is:
-
- <H1>This is a Heading</H1>
-
- Some elements only have a start-tag without an end-tag. For example,
- to create a line break, use the `<BR>' tag. Additionally, the end
- tags of some other elements, such as Paragraph (`</P>'), List Item
- (`</LI>'), Definition Term (`</DT>'), and Definition Description
- (`</DD>') elements, may be omitted.
-
- 5. Document Structure
-
- An HTML document is a tree of elements, including a head and body,
- headings, paragraphs, lists, etc. Form elements are discussed in 8,
- "Forms".
-
- The HTML document element consists of a head and a body, much like a
- memo or a mail message. The head contains the title and optional
- elements. The body is a text flow consisting of paragraphs, lists,
- and other elements.
-
- 5.2. Head: HEAD
-
- The head of an HTML document is an unordered collection of
- information about the document. For example:
-
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
- <HEAD>
- <TITLE>Introduction to HTML</TITLE>
- </HEAD>
- ...
-
- 5.2.1. Title: TITLE
-
- Every HTML document must contain a <TITLE> element.
-
- The title should identify the contents of the document in a global
- context. A short title, such as "Introduction" may be meaningless out
- of context. A title such as "Introduction to HTML Elements" is more
- appropriate.
-
- NOTE - The length of a title is not limited; however, long titles
- may be truncated in some applications. To minimize this
- possibility, titles should be fewer than 64 characters.
-
- A user agent may display the title of a document in a history list or
- as a label for the window displaying the document. This differs from
- headings (5.4, "Headings: H1 ... H6"), which are typically displayed
- within the body text flow.
-
- 5.2.2. Base Address: BASE
-
- The optional <BASE> element provides a base address for interpreting
- relative URLs when the document is read out of context (see 7,
- "Hyperlinks"). The value of the HREF attribute must be an absolute
- URI.
-
- 5.2.3. Keyword Index: ISINDEX
-
- The <ISINDEX> element indicates that the user agent should allow the
- user to search an index by giving keywords. See 7.5, "Queries and
- Indexes" for details.
-
- 5.2.4. Link: LINK
-
- The <LINK> element represents a hyperlink (see 7, "Hyperlinks"). Any
- number of LINK elements may occur in the <HEAD> element of an HTML
- document. It has the same attributes as the <A> element (see 5.7.3,
- "Anchor: A").
-
- The <LINK> element is typically used to indicate authorship, related
- indexes and glossaries, older or more recent versions, document
- hierarchy, associated resources such as style sheets, etc.
-
- 5.2.5. Associated Meta-information: META
-
- The <META> element is an extensible container for use in identifying
- specialized document meta-information. Meta-information has two main
- functions:
-
- * to provide a means to discover that the data set exists
- and how it might be obtained or accessed; and
-
- * to document the content, quality, and features of a data
- set, indicating its fitness for use.
-
- Each <META> element specifies a name/value pair. If multiple META
- elements are provided with the same name, their combined contents--
- concatenated as a comma-separated list--is the value associated with
- that name.
-
- NOTE - The <META> element should not be used where a
- specific element, such as <TITLE>, would be more
- appropriate. Rather than a <META> element with a URI as
- the value of the CONTENT attribute, use a <LINK>
- element.
-
- HTTP servers may read the content of the document <HEAD> to generate
- header fields corresponding to any elements defining a value for the
- attribute HTTP-EQUIV.
-
- NOTE - The method by which the server extracts document
- meta-information is unspecified and not mandatory. The
- <META> element only provides an extensible mechanism for
- identifying and embedding document meta-information --
- how it may be used is up to the individual server
- implementation and the HTML user agent.
-
-
-
- Attributes of the META element:
-
- HTTP-EQUIV
- binds the element to an HTTP header field. An HTTP
- server may use this information to process the document.
- In particular, it may include a header field in the
- responses to requests for this document: the header name
- is taken from the HTTP-EQUIV attribute value, and the
- header value is taken from the value of the CONTENT
- attribute. HTTP header names are not case sensitive.
-
- NAME
- specifies the name of the name/value pair. If not
- present, HTTP-EQUIV gives the name.
-
- CONTENT
- specifies the value of the name/value pair.
-
- Examples
-
- If the document contains:
-
- <META HTTP-EQUIV="Expires"
- CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
- <meta http-equiv="Keywords" CONTENT="Fred">
- <META HTTP-EQUIV="Reply-to"
- content="fielding@ics.uci.edu (Roy Fielding)">
- <Meta Http-equiv="Keywords" CONTENT="Barney">
-
- then the server may include the following header fields:
-
- Expires: Tue, 04 Dec 1993 21:29:02 GMT
- Keywords: Fred, Barney
- Reply-to: fielding@ics.uci.edu (Roy Fielding)
-
- as part of the HTTP response to a `GET' or `HEAD' request for
- that document.
-
- An HTTP server must not use the <META> element to form an HTTP
- response header unless the HTTP-EQUIV attribute is present.
-
- An HTTP server may disregard any <META> elements that specify
- information controlled by the HTTP server, for example `Server',
-
- `Date', and `Last-modified'.
-
-
- 5.3. Body: BODY
-
- The <BODY> element contains the text flow of the document, including
- headings, paragraphs, lists, etc.
-
- For example:
-
- <BODY>
- <h1>Important Stuff</h1>
- <p>Explanation about important stuff...
- </BODY>
-
- 5.4. Headings: H1 ... H6
-
- The six heading elements, <H1> through <H6>, denote section headings.
- Although the order and occurrence of headings is not constrained by
- the HTML DTD, documents should not skip levels (for example, from H1
- to H3), as converting such documents to other representations is
- often problematic.
-
- Example of use:
-
- <H1>This is a heading</H1>
- Here is some text
- <H2>Second level heading</H2>
- Here is some more text.
-
- Typical renderings are:
-
- H1
- Bold, very-large font, centered. One or two blank lines
- above and below.
-
- H2
- Bold, large font, flush-left. One or two blank lines
- above and below.
-
-
- H3
- Italic, large font, slightly indented from the left
- margin. One or two blank lines above and below.
-
- H4
- Bold, normal font, indented more than H3. One blank line
- above and below.
-
- H5
- Italic, normal font, indented as H4. One blank line
- above.
-
- H6
- Bold, indented same as normal text, more than H5. One
- blank line above.
-
- 5.5. Block Structuring Elements
-
- Block structuring elements include paragraphs, lists, and block
- quotes. They must not contain heading elements, but they may contain
- phrase markup, and in some cases, they may be nested.
-
- 5.5.1. Paragraph: P
-
- The <P> element indicates a paragraph. The exact indentation, leading
- space, etc. of a paragraph is not specified and may be a function of
- other tags, style sheets, etc.
-
- Typically, paragraphs are surrounded by a vertical space of one line
- or half a line. The first line in a paragraph is indented in some
- cases.
-
- Example of use:
-
- <H1>This Heading Precedes the Paragraph</H1>
- <P>This is the text of the first paragraph.
- <P>This is the text of the second paragraph. Although you do not
- need to start paragraphs on new lines, maintaining this
- convention facilitates document maintenance.</P>
- <P>This is the text of a third paragraph.</P>
-
- 5.5.2. Preformatted Text: PRE
-
- The <PRE> element represents a character cell block of text and is
- suitable for text that has been formatted for a monospaced font.
-
- The <PRE> tag may be used with the optional WIDTH attribute. The
- WIDTH attribute specifies the maximum number of characters for a line
-
- and allows the HTML user agent to select a suitable font and
- indentation.
-
- Within preformatted text:
-
- * Line breaks within the text are rendered as a move to the
- beginning of the next line.
-
- NOTE - References to the "beginning of a new line"
- do not imply that the renderer is forbidden from
- using a constant left indent for rendering
- preformatted text. The left indent may be
- constrained by the width required.
-
- * Anchor elements and phrase markup may be used.
-
- NOTE - Constraints on the processing of <PRE>
- content may limit or prevent the ability of the HTML
- user agent to faithfully render phrase markup.
-
- * Elements that define paragraph formatting (headings,
- address, etc.) must not be used.
-
- NOTE - Some historical documents contain <P> tags in
- <PRE> elements. User agents are encouraged to treat
- this as a line break. A <P> tag followed by a
- newline character should produce only one line
- break, not a line break plus a blank line.
-
- * The horizontal tab character (code position 9 in the HTML
- document character set) must be interpreted as the smallest
- positive nonzero number of spaces which will leave the
- number of characters so far on the line as a multiple of 8.
- Documents should not contain tab characters, as they are not
- supported consistently.
-
- Example of use:
-
- <PRE>
- Line 1.
- Line 2 is to the right of line 1. <a href="abc">abc</a>
- Line 3 aligns with line 2. <a href="def">def</a>
- </PRE>
-
-
- 5.5.2.1. Example and Listing: XMP, LISTING
-
- The <XMP> and <LISTING> elements are similar to the <PRE> element,
- but they have a different syntax. Their content is declared as CDATA,
- which means that no markup except the end-tag open delimiter-in-
- context is recognized (see 9.6 "Delimiter Recognition" of [SGML]).
-
- NOTE - In a previous draft of the HTML specification, the syntax
- of <XMP> and <LISTING> elements allowed closing tags to be treated
- as data characters, as long as the tag name was not <XMP> or
- <LISTING>, respectively.
-
- Since CDATA declared content has a number of unfortunate interactions
- with processing techniques and tends to be used and implemented
- inconsistently, HTML documents should not contain <XMP> nor <LISTING>
- elements -- the <PRE> tag is more expressive and more consistently
- supported.
-
- The <LISTING> element should be rendered so that at least 132
- characters fit on a line. The <XMP> element should be rendered so
- that at least 80 characters fit on a line but is otherwise identical
- to the <LISTING> element.
-
- NOTE - In a previous draft, HTML included a <PLAINTEXT> element
- that is similar to the <LISTING> element, except that there is no
- closing tag: all characters after the <PLAINTEXT> start-tag are
- data.
-
- 5.5.3. Address: ADDRESS
-
- The <ADDRESS> element contains such information as address, signature
- and authorship, often at the beginning or end of the body of a
- document.
-
- Typically, the <ADDRESS> element is rendered in an italic typeface
- and may be indented.
-
- Example of use:
-
- <ADDRESS>
- Newsletter editor<BR>
- J.R. Brown<BR>
- JimquickPost News, Jimquick, CT 01234<BR>
- Tel (123) 456 7890
- </ADDRESS>
-
-
- 5.5.4. Block Quote: BLOCKQUOTE
-
- The <BLOCKQUOTE> element contains text quoted from another source.
-
- A typical rendering might be a slight extra left and right indent,
- and/or italic font. The <BLOCKQUOTE> typically provides space above
- and below the quote.
-
- Single-font rendition may reflect the quotation style of Internet
- mail by putting a vertical line of graphic characters, such as the
- greater than symbol (>), in the left margin.
-
- Example of use:
-
- I think the play ends
- <BLOCKQUOTE>
- <P>Soft you now, the fair Ophelia. Nymph, in thy orisons, be all
- my sins remembered.
- </BLOCKQUOTE>
- but I am not sure.
-
- 5.6. List Elements
-
- HTML includes a number of list elements. They may be used in
- combination; for example, a <OL> may be nested in an <LI> element of
- a <UL>.
-
- The COMPACT attribute suggests that a compact rendering be used.
-
- 5.6.1. Unordered List: UL, LI
-
- The <UL> represents a list of items -- typically rendered as a
- bulleted list.
-
- The content of a <UL> element is a sequence of <LI> elements. For
- example:
-
- <UL>
- <LI>First list item
- <LI>Second list item
- <p>second paragraph of second item
- <LI>Third list item
- </UL>
-
- 5.6.2. Ordered List: OL
-
- The <OL> element represents an ordered list of items, sorted by
- sequence or order of importance. It is typically rendered as a
-
- numbered list.
-
- The content of a <OL> element is a sequence of <LI> elements. For
- example:
-
- <OL>
- <LI>Click the Web button to open URI window.
- <LI>Enter the URI number in the text field of the Open URI
- window. The Web document you specified is displayed.
- <ol>
- <li>substep 1
- <li>substep 2
- </ol>
- <LI>Click highlighted text to move from one link to another.
- </OL>
-
- 5.6.3. Directory List: DIR
-
- The <DIR> element is similar to the <UL> element. It represents a
- list of short items, typically up to 20 characters each. Items in a
- directory list may be arranged in columns, typically 24 characters
- wide.
-
- The content of a <DIR> element is a sequence of <LI> elements.
- Nested block elements are not allowed in the content of <DIR>
- elements. For example:
-
- <DIR>
- <LI>A-H<LI>I-M
- <LI>M-R<LI>S-Z
- </DIR>
-
- 5.6.4. Menu List: MENU
-
- The <MENU> element is a list of items with typically one line per
- item. The menu list style is typically more compact than the style of
- an unordered list.
-
- The content of a <MENU> element is a sequence of <LI> elements.
- Nested block elements are not allowed in the content of <MENU>
- elements. For example:
-
- <MENU>
- <LI>First item in the list.
- <LI>Second item in the list.
- <LI>Third item in the list.
- </MENU>
-
- 5.6.5. Definition List: DL, DT, DD
-
- A definition list is a list of terms and corresponding definitions.
- Definition lists are typically formatted with the term flush-left and
- the definition, formatted paragraph style, indented after the term.
-
- The content of a <DL> element is a sequence of <DT> elements and/or
- <DD> elements, usually in pairs. Multiple <DT> may be paired with a
- single <DD> element. Documents should not contain multiple
- consecutive <DD> elements.
-
- Example of use:
-
- <DL>
- <DT>Term<DD>This is the definition of the first term.
- <DT>Term<DD>This is the definition of the second term.
- </DL>
-
- If the DT term does not fit in the DT column (typically one third of
- the display area), it may be extended across the page with the DD
- section moved to the next line, or it may be wrapped onto successive
- lines of the left hand column.
-
- The optional COMPACT attribute suggests that a compact rendering be
- used, because the list items are small and/or the entire list is
- large.
-
- Unless the COMPACT attribute is present, an HTML user agent may leave
- white space between successive DT, DD pairs. The COMPACT attribute
- may also reduce the width of the left-hand (DT) column.
-
- <DL COMPACT>
- <DT>Term<DD>This is the first definition in compact format.
- <DT>Term<DD>This is the second definition in compact format.
- </DL>
-
-